<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>JavaScript简介 | css的学习</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../js/JavaScript数据类型.html" />
    
    
    <link rel="prev" href="../js/00.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="4.1"
        data-chapter-title="JavaScript简介"
        data-filepath="js/JavaScript简介.md"
        data-basepath=".."
        data-revision="Mon Jul 23 2018 09:39:03 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="gitbookInstall.html">
            
                
                    <a href="../gitbookInstall.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        gitbook的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="HTML/html.html">
            
                
                    <a href="../HTML/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        HTML的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="HTML/HTML文件格式.html">
            
                
                    <a href="../HTML/HTML文件格式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        HTML的文件声明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
            <span><b>2.2.</b> html标签</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" >
            
            <span><b>2.2.1.</b> a标签</span>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="css/CSS的学习.html">
            
                
                    <a href="../css/CSS的学习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        CSS的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="css/yinyong.html">
            
                
                    <a href="../css/yinyong.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        css引用方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="css/select.html">
            
                
                    <a href="../css/select.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        css选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="css/font.html">
            
                
                    <a href="../css/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        css设置字体样式font
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="css/background.html">
            
                
                    <a href="../css/background.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        通过CSS设置背景background
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="css/textalign.html">
            
                
                    <a href="../css/textalign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        文字对齐方式和光标样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="css/盒子模型.html">
            
                
                    <a href="../css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="css/textyichu.html">
            
                
                    <a href="../css/textyichu.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        文字溢出处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="css/position.html">
            
                
                    <a href="../css/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        定位position
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="js/00.html">
            
                
                    <a href="../js/00.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        js的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.1" data-path="js/JavaScript简介.html">
            
                
                    <a href="../js/JavaScript简介.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        JavaScript简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="js/JavaScript数据类型.html">
            
                
                    <a href="../js/JavaScript数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        JavaScript数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="js/JavaScript运算符.html">
            
                
                    <a href="../js/JavaScript运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        javascript运算符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >css的学习</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h3 id="javascript&#x7B80;&#x4ECB;">javascript&#x7B80;&#x4ECB;</h3>
<h4 id="&#x4EC0;&#x4E48;&#x662F;javascript&#xFF1F;">&#x4EC0;&#x4E48;&#x662F;Javascript&#xFF1F;</h4>
<p>  javascript&#x662F;&#x4E00;&#x79CD;&#x5F31;&#x7C7B;&#x578B;&#x811A;&#x672C;&#x8BED;&#x8A00;&#xFF1B;</p>
<h4 id="javascript&#x7684;&#x7EC4;&#x6210;&#x90E8;&#x5206;">JavaScript&#x7684;&#x7EC4;&#x6210;&#x90E8;&#x5206;</h4>
<p>  ECMAscript&#xFF1A;JavaScript&#x7684;&#x6838;&#x5FC3;&#x8BED;&#x8A00;</p>
<p>  DOM&#xFF08;&#x6587;&#x6863;&#x5BF9;&#x8C61;&#x6A21;&#x578B;&#xFF09;document object model&#xFF0C;&#x7528;&#x6765;&#x64CD;&#x4F5C;html&#x6587;&#x6863;&#xFF1B;</p>
<p>  BOM&#xFF08;browser object model&#xFF09;&#x6D4F;&#x89C8;&#x5668;&#x5BF9;&#x8C61;&#x6A21;&#x578B;&#xFF0C;&#x7528;&#x6765;&#x64CD;&#x4F5C;&#x6D4F;&#x89C8;&#x5668;</p>
<h4 id="javascript&#x6838;&#x5FC3;&#x8BED;&#x6CD5;">JavaScript&#x6838;&#x5FC3;&#x8BED;&#x6CD5;</h4>
<h5 id="&#x53D8;&#x91CF;&#x7684;&#x58F0;&#x660E;">&#x53D8;&#x91CF;&#x7684;&#x58F0;&#x660E;</h5>
<p>   &#x53D8;&#x91CF;&#x7684;&#x58F0;&#x660E;&#x662F;&#x901A;&#x8FC7;&#x5173;&#x952E;&#x5B57;var&#x6765;&#x751F;&#x547D;&#x7684;
   &#x5982;var &#x53D8;&#x91CF;&#x540D;= &#x53D8;&#x91CF;&#x503C;&#xFF1B;
   &#x5728;JavaScript&#x4E2D;&#x5206;&#x53F7;;&#x4EE3;&#x8868;&#x4E00;&#x53E5;&#x8BDD;&#x7684;&#x7ED3;&#x675F;</p>
<h5 id="&#x53D8;&#x91CF;&#x7684;&#x547D;&#x540D;&#x89C4;&#x5219;">&#x53D8;&#x91CF;&#x7684;&#x547D;&#x540D;&#x89C4;&#x5219;</h5>
<p>1&#x3001;&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x5FC5;&#x987B;&#x662F;&#x5B57;&#x6BCD;&#xFF0C;&#x4E0B;&#x5212;&#x7EBF;&#xFF08;_&#xFF09;,&#x6216;&#x8005;&#x662F;$;</p>
<p>2&#x3001;&#x53D8;&#x91CF;&#x7684;&#x4E2D;&#x95F4;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x6216;&#x8005;&#x5176;&#x4ED6;&#x7684;&#x7279;&#x6B8A;&#x7B26;&#x53F7;&#xFF0C;&#x4E0B;&#x5212;&#x7EBF;&#x548C;$&#x9664;&#x5916;&#xFF1B;</p>
<p>3&#x3001;&#x53D8;&#x91CF;&#x540D;&#x533A;&#x5206;&#x5927;&#x5C0F;&#x5199;&#xFF1B;</p>
<p>3&#x3001;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x5173;&#x952E;&#x5B57;&#x6216;&#x8005;&#x4FDD;&#x7559;&#x5B57;&#xFF1B;</p>
<h5 id="&#x600E;&#x4E48;&#x5728;&#x7F51;&#x9875;&#x4E2D;&#x67E5;&#x770B;&#x751F;&#x547D;&#x53D8;&#x91CF;&#x7684;&#x503C;&#xFF1F;">&#x600E;&#x4E48;&#x5728;&#x7F51;&#x9875;&#x4E2D;&#x67E5;&#x770B;&#x751F;&#x547D;&#x53D8;&#x91CF;&#x7684;&#x503C;&#xFF1F;</h5>
<p>1&#x3001;alert&#xFF08;&#xFF09;;&#x5728;&#x5F39;&#x7A97;&#x4E2D;&#x663E;&#x793A;</p>
<p>2&#x3001;document.write&#xFF08;&#xFF09;&#xFF1B;&#x5199;&#x5165;&#x5230;&#x6587;&#x6863;&#x4E2D;&#xFF1B;</p>
<p>3&#x3001;document.log();&#x5728;&#x63A7;&#x5236;&#x592A;&#x91CD;&#x663E;&#x793A;
    &#x5982;:var num = 1;
                  console.log(num);
                  document.write(num);
                  alert(num);</p>
<h4 id="&#x5982;&#x4F55;&#x5C06;javascript&#x5F15;&#x5165;&#x5230;html&#x6587;&#x4EF6;&#x4E2D;">&#x5982;&#x4F55;&#x5C06;JavaScript&#x5F15;&#x5165;&#x5230;html&#x6587;&#x4EF6;&#x4E2D;</h4>
<p> 1&#x3001;&#x5728;script&#x6807;&#x7B7E;&#x63D2;&#x5165;&#x5230;&#x7F51;&#x9875;&#x5185;&#xFF0C;&#x5728;script&#x6807;&#x7B7E;&#x4E2D;&#x4E66;&#x5199;JavaScript&#x4EE3;&#x7801;&#xFF1B;
&#x53EF;&#x4EE5;&#x63D2;&#x5165;&#x5230;head&#x6807;&#x7B7E;&#x6216;&#x8005;body&#x7ED3;&#x675F;&#x53D8;&#x8FC1;&#x524D;&#x9762;&#xFF0C;&#x5EFA;&#x8BAE;&#x5C06;script&#x6807;&#x7B7E;&#x51FA;&#x5165;&#x5230;body&#x7ED3;&#x675F;&#x6807;&#x7B7E;&#x524D;&#x9762;&#xFF0C;
&#x56E0;&#x4E3A;&#x6D4F;&#x89C8;&#x5668;&#x7684;&#x52A0;&#x8F7D;&#x987A;&#x5E8F;&#x662F;&#x4ECE;&#x4E0A;&#x5230;&#x4E0B;&#x89E3;&#x6790;&#x52A0;&#x8F7D;&#x7684;&#xFF1B;
2&#x3001;&#x628A;JavaScript&#x76F4;&#x63A5;&#x63D2;&#x5165;&#x5230;&#x6807;&#x7B7E;&#x4E2D;&#xFF08;&#x4E0E;css&#x884C;&#x5185;&#x6837;&#x5F0F;&#x76F8;&#x4F3C;&#xFF09;
3&#x3001;&#x901A;&#x8FC7;script&#x6807;&#x7B7E;&#x7684;src&#x5C5E;&#x6027;&#x5F15;&#x5165;&#x5916;&#x90E8;&#x7684;js&#x6587;&#x4EF6;&#xFF1B;</p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../js/00.html" class="navigation navigation-prev " aria-label="Previous page: js的学习"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../js/JavaScript数据类型.html" class="navigation navigation-next " aria-label="Next page: JavaScript数据类型"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
